import request from '@/utils/request'

// 列表查询
export function listManagement(query) {
  return request({
    url: '/system/list/list',
    method: 'get',
    params: query
  })
}
export function listSubject(query) {
  return request({
    url: '/system/list/list',
    method: 'get',
    params: query
  })
}
// 新增分类下拉列表查询
export function listAccount(query) {
    return request({
      url: '/system/class/listAll',
      method: 'get',
      params: query
    })
  }
// 查询详细
export function getSubject(dataId) {
  return request({
    url: '/system/list/' + dataId,
    method: 'get'
  })
}

// 新增
export function addSubject(data) {
  return request({
    url: '/system/list',
    method: 'post',
    data: data
  })
}

// 修改
export function updateSubject(data) {
  return request({
    url: '/system/list',
    method: 'put',
    data: data
  })
}

// 删除
export function delSubject(dataId) {
  return request({
    url: '/system/list/' + dataId,
    method: 'delete'
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}

//查询二级部门
export function listTwoDept(query) {
  return request({
    url: '/system/dept/list',
    method: 'get',
    params: query
  })
}

//查询付款单位
export function listPaydept(query) {
  return request({
    url: '/system/paymentdept/list',
    method: 'get',
    params: query
  })
}